<template>
	<view class="header">
		<uni-icons type="left" size="25" class="left-btn" @click="goback"></uni-icons>
		<view class="title">宝宝日记</view>
		<view class="header-right">
			<uni-icons type="search" size="25" class="search-btn" color="#666EE8"></uni-icons>&nbsp;&nbsp;&nbsp;&nbsp;
			<uni-icons type="plus" size="25" class="plus-btn" color="#666EE8" @click="add"></uni-icons>
		</view>
	</view>
	<view class="start-row">已陪伴宝宝&nbsp;<span class="days">666</span>&nbsp;天</view>
	
	<view class="first-row">
		<view class="first-row-left">
			<uni-icons type="smallcircle" size="22" color="#666EE8"></uni-icons>
			<span class="record-time">今天</span>
		</view>	
		<view class="first-row-right">第&nbsp;<span class="days">666</span>&nbsp;天</view>
	</view>
	
	<view class="my-card-border">
		<view class="my-card">		
			<view class="row-item" >
				<image src="../../../static/picture/1.jpg" class="diary-image" ></image>
				<image src="../../../static/picture/2.jpg" class="diary-image" ></image>
				<image src="../../../static/picture/3.jpg" class="diary-image" ></image>	
			</view>
			<view class="row-item" >
				<image src="../../../static/picture/4.jpg" class="diary-image" ></image>
				<image src="../../../static/picture/5.jpg" class="diary-image" ></image>
				<image src="../../../static/picture/6.jpg" class="diary-image" ></image>	
			</view>
			<view class="diary-content">今天是初一，带宝贝去看电影《小猪佩奇过大年》，之后去迪卡侬，本来是要给她买轮滑鞋的。但她过去尝试打棒球、踢球，之后去打乒乓球、打羽毛球。我们都试了，我感觉要了好大劲教她......</view>
			<view class="diary-content-all" @click="toDiaryContent">全文</view>
			<view class="diary-content-time">3小时前</view>
		</view>
	</view>
	
	<view class="first-row">
		<view class="first-row-left">
			<uni-icons type="smallcircle" size="22" color="#666EE8"></uni-icons>
			<span class="record-time">昨天</span>
		</view>		
		<view class="first-row-right">第&nbsp;<span class="days">665</span>&nbsp;天</view>
	</view>
	
	<view class="my-card-border">
		<view class="my-card">				
			<view class="diary-record">身高&nbsp;<text class="diary-record-data">55&nbsp;cm</text></view>
			<view class="diary-record">体重&nbsp;<text class="diary-record-data">15&nbsp;kg</text></view>
			<view class="diary-record">头围&nbsp;<text class="diary-record-data">30&nbsp;cm</text></view>
			<view class="diary-content-time">08:08</view>
		</view>
	</view>
	
	<view class="first-row">
		<view class="first-row-left">
			<uni-icons type="smallcircle" size="22" color="#666EE8"></uni-icons>
			<span class="record-time">2024/06/06</span>
		</view>		
		<view class="first-row-right">第&nbsp;<span class="days">611</span>&nbsp;天</view>
	</view>
	
	<view class="my-card-border">
		<view class="my-card">		
			<view class="my-card-title">宝宝第一次走路</view>
			<view class="diary-content">宝宝终于迈出第一步啦，开心！！！</view>
			<view class="diary-content-time">13:14</view>
		</view>
	</view>
	
</template>

<script setup>
const goback =()=>{
	uni.switchTab({
		url: '/pages/home/home' 
	});
}

const add =()=>{
	uni.redirectTo({
		url: '/pages/baby_diary/add_diary/add_diary' 
	});
}

const toDiaryContent = () => {
	uni.navigateTo({
		url: '/pages/baby_diary/content/content'
	})
}
</script>

<style scoped>
.header {
	background-color: #fff;
	display: flex;
	justify-content: space-between;
	padding: 20rpx 14rpx;
	border-bottom: 2rpx solid #F5F5F5;
}
.title {
	font-size: 32rpx;
	font-weight: bold;
	margin-left: 94rpx;
	align-items:center;
}
.start-row{
	margin: 30rpx 26rpx;
}
.first-row{
	margin: 0rpx 24rpx;
	display: flex;
	justify-content: space-between;
	
}
.first-row-left{
	display: flex;
	align-items: center;
}
.record-time{
	font-size: 34rpx;
	margin-left: 20rpx;
	margin-bottom: 4rpx;
}
.first-row-right{
	font-size: 26rpx;
	margin-bottom:2rpx;
	color: #999999;
	
}
.days{
	font-size: 38rpx;
	font-weight: 800;
	color: #666EE8;
}  
.my-card-border{
	border-left: 4rpx solid #E4E4E4;
	margin-left: 44rpx;
	margin-bottom: 30rpx;
}

.my-card{
	box-shadow: 0rpx 0rpx 4rpx rgb(170, 170, 127);
	margin: 20rpx 30rpx ;
	background-color: #fff;
	border-radius: 10rpx;
	padding: 20rpx ;
}
.row-item{
	display: flex;
	justify-content: space-around; 
	margin-bottom: 20rpx;
}

.diary-image{
	width: 180rpx;
	height: 110rpx;
}
.diary-content{
	font-size: 26rpx;
	line-height: 40rpx;
	margin-bottom: 20rpx;
	color: #999999;
}
.diary-content-all{
	font-size: 26rpx;
	line-height: 50rpx;
	color: #666EE8;
	display: flex;
	justify-content: flex-end;
}
.diary-content-time{
	font-size: 24rpx;
	line-height: 50rpx;
	color: #DBD0CC;
}
.diary-record{
	font-size: 30rpx;
	line-height: 50rpx;
	color: #999999;
}
.diary-record-data{
	color:black;
}
.my-card-title{
	font-size: 28rpx;
	margin:30rpx 0rpx;
}
</style>
